package com.tcu.boiler.factory.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tcu.boiler.factory.entity.FactoryGroup;
import com.tcu.boiler.factory.mapper.FactoryGroupMapper;
import com.tcu.boiler.factory.service.IFactoryGroupService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.stream.Collectors;

@Service
public class FactoryGroupServiceImpl extends ServiceImpl<FactoryGroupMapper, FactoryGroup> implements IFactoryGroupService {
    @Override
    public String getMarkIds(String factoryId, String groupId) {
        QueryWrapper<FactoryGroup> wrapper = new QueryWrapper<>();
        wrapper.eq("factory_id",factoryId).eq("group_id",groupId);

        FactoryGroup factoryGroup = baseMapper.selectOne(wrapper);

        return factoryGroup.getMarkId();

    }
}
